﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace ModelSerialize
{
    public class TempFile : IDisposable
    {
        public string FileName { get; private set; }

        public TempFile(string file)
        {
            FileName = file;
        }

        public void Dispose()
        {
            if (string.IsNullOrEmpty(FileName))
                return;

            if (!File.Exists(FileName))
                return;

            File.Delete(FileName);
        }
    }
}
